# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libcaca
pkgver=0.99.beta20
pkgrel=1
pkgdesc="Color AsCii Art library"
url="http://caca.zoy.org/wiki/libcaca"
arch=(x86_64)
license=(custom:WTFPL)
depends=(imlib2 ncurses)
makedepends=(git)
_commit=373c88b9890e67bde91e6acb8f1c442e847d1203
source=("git+https://github.com/cacalabs/libcaca#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd libcaca
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd libcaca
  autoreconf -fvi
}

build() {
  cd libcaca
  ./configure \
    --prefix=/usr \
    --libexecdir=/usr/lib \
    --mandir=/usr/share/man \
    --enable-shared \
    --disable-csharp \
    --disable-cxx \
    --disable-doc \
    --disable-gl \
    --disable-python \
    --disable-slang \
    --disable-static
  make
}

package() {
  cd libcaca
  make DESTDIR="$pkgdir" install
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}

# vim:set sw=2 et:
